# Maintainer: Sarah Ottinger <schalaalexiazeal@gmail.com>

_realname=butler
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
pkgver=15.20
_gitcommit=69bd25daddd4b6b9f2b86cd6376e6ed522accfbb
pkgrel=1
pkgdesc='Command-line itch.io helper (mingw-w64)'
arch=('any')
url="https://github.com/itchio/butler"
license=('MIT')
makedepends=("${MINGW_PACKAGE_PREFIX}-go" git)
source=("${_realname}::git+https://github.com/itchio/butler#commit=${_gitcommit}")
sha256sums=('SKIP')

build() {
  msg "Build for ${CARCH}"  
  cd "${srcdir}/${_realname}"
  ${MINGW_PREFIX}/bin/go build
}

package() {
  cd "${srcdir}/${_realname}"
  install -Dm755 butler.exe "${pkgdir}${MINGW_PREFIX}/bin/butler.exe"
  install -Dm644 LICENSE "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE"
}
